/**
 * Author: Dmitry Ustimov
 * Date: 5/31/13
 * Time: 8:33 PM
 */

package com.gmail.dmitryustimov.ms.java7.mediator.classic.work.demo.col10event1;

public class Demo {

    private static final int NUM_UPDATES = 1;

    public static void main(String[] args) {

        Mediator mediator = new Mediator("Mediator");

        AbstractColleague c1 = new ConcreteColleague1("ConcreteColleague1", mediator);
        AbstractColleague c2 = new ConcreteColleague2("ConcreteColleague2", mediator);
        AbstractColleague c3 = new ConcreteColleague3("ConcreteColleague3", mediator);
        AbstractColleague c4 = new ConcreteColleague4("ConcreteColleague4", mediator);
        AbstractColleague c5 = new ConcreteColleague5("ConcreteColleague5", mediator);
        AbstractColleague c6 = new ConcreteColleague6("ConcreteColleague6", mediator);
        AbstractColleague c7 = new ConcreteColleague7("ConcreteColleague7", mediator);
        AbstractColleague c8 = new ConcreteColleague8("ConcreteColleague8", mediator);
        AbstractColleague c9 = new ConcreteColleague9("ConcreteColleague9", mediator);
        AbstractColleague c10 = new ConcreteColleague10("ConcreteColleague10", mediator);

        mediator.addColleague(c1);
        mediator.addColleague(c2);
        mediator.addColleague(c3);
        mediator.addColleague(c4);
        mediator.addColleague(c5);
        mediator.addColleague(c6);
        mediator.addColleague(c7);
        mediator.addColleague(c8);
        mediator.addColleague(c9);
        mediator.addColleague(c10);

        for (long j = 0; j < NUM_UPDATES; j++) {
            c1.makeEvent();
            c2.makeEvent();
            c3.makeEvent();
            c4.makeEvent();
            c5.makeEvent();
            c6.makeEvent();
            c7.makeEvent();
            c8.makeEvent();
            c9.makeEvent();
            c10.makeEvent();
        }
    }
}
